<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<!DOCTYPE HTML>  
<html manifest="index.manifest">
<head>
<meta charset="utf-8"/>
<script type="text/javascript" src="../js/cache1.js"></script>
<script type="text/javascript" src="../js/cache2.js"></script>
<!-- <script type="text/javascript" src="../js/cache3_not_exists.js"></script> -->
<script type="text/javascript" src="../js/network.js"></script>

<script type="text/javascript">
	window.onload = function() {
		alert('page onloaded!');	
	};
	
	var ac = applicationCache;
//	alert(ac);
	
	applicationCache.onchecking = function(e1, e2) {
		alert('onchecking');
	};
	
	applicationCache.ondownloading = function(e1, e2) {
		alert('ondownloading');
	};
	
	applicationCache.onprogress = function(e1, e2) {
		alert('onprogress');
	};
	
	applicationCache.oncached = function(e1, e2) {
		alert('oncached');
	};
	
	applicationCache.onnoupdate = function(e1, e2) {
		alert('onnoupdate');
	};
	
	applicationCache.onupdateready = function(e1, e2) {
		alert('onupdateready');
		applicationCache.swapCache();
		alert('swapCache over!');
	};
	
	applicationCache.onobsolete = function(e1, e2) {
		alert('onobsolete');
	};
	
	applicationCache.onerror = function(e1, e2) {
		alert('onerror');
	};
	
	
	
	
	function upd() {
		applicationCache.update();
	}
	
</script>

</head>
<body>
    <img alt="" src="../images/online.jpg" width="100"><br/>
    <img alt="" src="../images/3.jpg" width="100"><br/>
    
    <button onclick="upd()">update cache</button>
</body>
</html>